package com.joker.orange.domain.vo;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.joker.common.annotation.ExcelDictFormat;
import com.joker.common.constant.CacheNames;
import com.joker.common.convert.ExcelDictConvert;
import com.joker.common.core.domain.model.LoginUser;
import com.joker.common.enums.UserType;
import com.joker.common.helper.LoginHelper;
import com.joker.common.utils.file.FileUtils;
import com.joker.common.utils.redis.CacheUtils;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;


/**
 * 应用信息视图对象 t_application_center
 *
 * @author Joker
 * @date 2024-06-09
 */
@Data
@ExcelIgnoreUnannotated
public class ApplicationCenterVo implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 唯一标识
     */
    @ExcelProperty(value = "唯一标识")
    private Long id;

    /**
     * 应用名称
     */
    @ExcelProperty(value = "应用名称")
    private String applicationName;

    /**
     * 应用logo
     */
    @ExcelProperty(value = "应用logo")
    private String applicationLogo;

    private String applicationLogoCopy;

    /**
     * 超链接地址
     */
    @ExcelProperty(value = "超链接地址")
    private String hyperlinkAddress;

    /**
     * 是否显示（0-显示、1-不显示）
     */
    @ExcelProperty(value = "是否显示", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "0=-显示、1-不显示")
    private String isDisplay;

    /**
     * 创建时间
     */
    @ExcelProperty(value = "创建时间")
    private Date createTime;

    /**
     * 备注
     */
    @ExcelProperty(value = "备注")
    private String remark;

    public String getApplicationLogoCopy() {
        return applicationLogo;
    }

    public String getApplicationLogo() {
        return FileUtils.getUrl(applicationLogo);
    }



}
